public class Demo47 {
    public static void main(String[] args) throws InterruptedException {
        Object locker=new Object();
        Thread t=new Thread(()->{
            synchronized (locker){
                System.out.println("hello t");
                try {
                    locker.wait();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });

        t.start();
        Thread.sleep(1000);
        System.out.println(t.getState());
    }
}
